import request from '@/utils/axiosRequest'
import useEnv from "@/hooks/useEnv";
const show = useEnv.VITE_FILE_API + "/shows?uuid="
const getPhoto = (id) => {
    return request({
        url: '/photo/getById?photoId=' + id
    })
}
const isLike = (id) => {
    return request({
        url: '/like/isLike?photoId=' + id
    })
}
const like = (id) => {
    return request({
        url: '/like/like?photoId=' + id
    })
}
const addWatch = (id) => {
    return request({
        url: '/userwatch/watch?photoId=' + id
    })
}

const comment = (data) => {
    return request({
        url: '/comment/comment',
        data: data,
        method: 'post'
    })
}

const comments = (id) => {
    return request({
        url: '/comment/comments?photoId=' + id
    })
}
const getReportTypes = () => {
    return request({ url: '/reportType/get' })
}

const addReport = (data) => {
    return request({
        url: '/report/add',
        data: data,
        method: 'post'
    })
}

export default {
    getPhoto,
    isLike,
    like,
    addWatch,
    show,
    comment,
    comments,
    getReportTypes,
    addReport
}